package com.zukxu.items.common.response;

import cn.hutool.http.HttpStatus;
import lombok.Getter;
import lombok.ToString;

/**
 * <p>
 * 状态码
 * </p>
 *
 * @author zukxu
 * @date 2020/12/23 0023 17:20
 */

@ToString
@Getter
public enum ResultStatus {
	/**
	 * 成功
	 */
	SUCCESS(HttpStatus.HTTP_OK, "OK"),
	/**
	 * 参数错误
	 */
	BAD_REQUEST(HttpStatus.HTTP_BAD_REQUEST, "Bad Request"),
	/**
	 * 请求错误
	 */
	INTERNAL_SERVER_ERROR(HttpStatus.HTTP_INTERNAL_ERROR, "Internal Server Error"),
	;


	/**
	 * 业务异常码
	 */
	private Integer code;
	/**
	 * 业务异常信息描述
	 */
	private String message;

	ResultStatus(Integer code, String message) {
		this.code = code;
		this.message = message;
	}
}

